﻿using System;
using System.Collections.Generic;
using MongoDB.Bson;

namespace QuotationService.HistoryQuotation
{
    /// <summary>
    /// 分线历史数据类
    /// </summary>
    internal class OptionMinuteDataCollection
    {
        public ObjectId _id;

        #region 属性(数据)

        /// <summary>
        /// 交易日（分钟，格式yyyyMMdd）
        /// </summary>
        public Int32 TradeDay { get; set; }

        /// <summary>
        /// 商品代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 分线数据
        /// </summary>
        public List<OptionMinuteData> MinuteData { get; set; }

        #endregion
    }

    /// <summary>
    /// 分线历史数据类
    /// </summary>
    public class OptionMinuteData
    {
        /// <summary>
        /// 分线时间（分钟，格式HHMM）
        /// </summary>
        public Int32 OccurTime { get; set; }

        /// <summary>
        /// 开盘价
        /// </summary>
        public double OpenPrice { get; set; }

        /// <summary>
        /// 最高成交价
        /// </summary>
        public double HighPrice { get; set; }

        /// <summary>
        /// 最低成交价
        /// </summary>
        public double LowPrice { get; set; }

        /// <summary>
        /// 收盘价
        /// </summary>
        public double ClosePrice { get; set; }

        /// <summary>
        /// 总量
        /// </summary>
        public Int64 KnockQty { get; set; }

        /// <summary>
        /// 成交金额
        /// </summary>
        public double KnockAmt { get; set; }

        /// <summary>
        /// 当前持仓
        /// </summary>
        public Int64 OpenPosition { get; set; }

        /// <summary>
        /// 成交均价
        /// </summary>
        public double KnockAvgPrice { get; set; }

        public Int32 TickSN { get; set; }
    }
}
